<?php
	session_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>读读</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                        <meta name="viewport" content="width=770"/>
        <link rel="icon" href="/favicon.png"/>
                
        <script type="text/javascript" src="../js/combined.js?12"></script>
                <script type="text/javascript" src="../js/sharing.js?12"></script>

                <link rel="stylesheet" href="../css/main.css?12"/>
    </head>
    <body onload="document.getElementById('reg_user_username').focus()">
        <div id="header">
            <div id="userpanel">
                
                                    <a href="/login.php">Log In</a>
                    &nbsp;<span style="color: #ccc;">&bull;</span>&nbsp;
                    <a href="/user/register">Create Account</a>

                
            </div>

            <h1 id="logo">
                <a href="/" class="logo">读读</a>
            </h1>

            <div style="font-size: 14px; margin-top: 8px;">A simple tool to save web pages for reading later.</div>
        </div>

        <div id="content">
            <form action="/user/registeraction.php" method="post" id="register_form"
 style="width: 240px; margin: 0px auto 0px auto; text-align: center;"
 onsubmit="
     var el;
     if ( (el = document.getElementById('reg_user_username')).value.indexOf('@') < 1) { alert('Please enter a valid email address.'); el.focus(); return false; } 
     if ( (el = document.getElementById('reg_user_password')).value.length < 1) { alert('Please choose a password.'); el.focus(); return false; } 
     return true;
 "
>

    <h2 style="margin-bottom: 0;">Create Account</h2>
    <p style="margin-top: 0; margin-bottom: 2em; font-size: 13px;">(this is completely free)</p>

    <?php if($_SESSION['userexist']){
    	echo 213;
    	?>
    	<div class="errors">
               <div class="error">This username is already taken.</div>
         </div>
    	<?php
    }?>
    
    <label for="reg_user_username" style="display: block;">Your email address:</label>
    <input id="reg_user_username" name="username" type="text" value=""/>

    <label for="reg_user_password" style="display: block; margin-top: 1em;">Choose a password:</label>
    <input style="margin-bottom: 1em;" type="password" value="" id="reg_user_password" name="pwd"/>
    <div><input id="register" type="submit" value="Create account"/></div>
    
    <div id="registration_explanation">
        <p>
            You can change these, 
            export your data, 
            or delete your account at any time.
        </p>
        <p style="margin-bottom: 0.5em; font-style: italic;">
            If you trust Instapaper with your email address, 
            I promise never to spam you or give your email address to spammers.
        </p>

        <p style="margin-top: 0;">
            &ndash; Marco Arment, founder
        </p>
    </div>
</form>        </div>

        <div id="footer">

            <a href="/faq">FAQ</a> &bull;

            <a href="/main/support">Support</a> &bull;
            <a href="/iphone">iPhone App</a> &bull;
            <a href="http://blog.instapaper.com/">Blog</a> &bull;
            <a href="http://twitter.com/instapaper">Twitter</a> &bull;
            <a href="/publishers">Information for Publishers</a> &bull;

            <a href="/press-kit">Press Kit</a> &bull;
            <a href="/privacy-policy">Privacy Policy</a> &bull;
            <a href="/api/full">API</a>

            
            <div style="margin-top: 1em;">
            &copy;&nbsp;2008-2011 Instapaper, LLC.
            Contact <a href="http://www.marco.org/">Marco Arment</a>, founder:
            <a href="mailto:instapaper@marco.org">instapaper@marco.org</a>.
            </div>

        </div>
        <script type="text/javascript">

          var _gaq = _gaq || [];
          _gaq.push(['_setAccount', 'UA-638312-6']);
          _gaq.push(['_trackPageview']);

          (function() {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
          })();

        </script>
    </body>
</html>
